#include "SDFConnotation.h"
#include "SDFSign.h"

namespace xpm {
	SDFConnotation::~SDFConnotation() {
		clear();
	}

	void SDFConnotation::clear() {
		for(SDFConnotation::iterator it = _items.begin(); it != _items.end(); ++it) {
			if ( *it != 0) {
				delete (*it);
				*it = 0;
			}
		}
		_items.clear();
	}

	void SDFConnotation::set_type(int type) {
		if ( _type != type ) {
			switch(type) {
			case SDF_OBJECT:
			case SDF_ARRAY:
				_type = type;
			default:
				_type = SDF_NULL;
			}
			_items.clear();
		}
	}
}